const state = {
  cartList: [],
};
const getters = {
  goods(state){
    return state.goodsList
  }
};
const mutations = {
  RECEIVEGOODSLIST(state, goodsList) {
    state.goodsList = goodsList
  },
};
const actions = {
  async getGoodsList({ commit }, payload) {
    const result = await reqGoodsList();
    if (result.code === 200) {
      commit('RECEIVEGOODSLIST', result.data);
    }
  },
};

export default {
  state,
  getters,
  mutations,
  actions,
};